import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/homepage',
    children:[
      {path: '/homepage', component: () => import('../views/homepage/HomePageView.vue')},
      {path: '/qualityManagement', component: () => import('@/views/qualityManagement/QualityManagementView.vue')},
      {path: '/acceptanceManagement', component: () => import('@/views/acceptanceManagement/AcceptanceManagement.vue')},
        {path: '/experimentEquipment', component: () => import('@/views/experiment/ExperimentEquipment.vue'),},
        {path: '/experimentLedger', component: () => import('@/views/experiment/ExperimentLedger.vue'),},
        {path: '/qualityAccept', component: () => import('@/views/qualityManagement/QualityAcceptView.vue'),},
      {path: '/dictManagement', component: () => import('@/views/dictManagement/DictManagement.vue'),}

    ]
  },
  {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router